<template>
<div>
  <div id="top">
    <div id="topBar">
        <p style="float: left;margin-left: 0.5rem">兑换成功</p>
      <router-link :to="{path:'/exchangePoints'}"><p style="float: right;color: #39a9ed;margin-right: 0.5rem" >确认</p></router-link>
    </div>
    <div id="success">
      <van-icon name="success" />
    </div>
    <p style="font-size: 1rem;margin-top: 1rem;">兑换成功</p>
    <div class="botton" style="margin-right: 2.5rem">查看订单</div>
    <div class="botton">立即使用</div>

  </div>
  <div id="bottom">
    <ul id="goodsPic">
      <li  v-for="item in goodsList">
        <div class="left">
        <div class="goodsPic" :style="{backgroundImage: 'url(' + item.img + ')', backgroundRepeat:'no-repeat', backgroundSize: 'cover',backgroundPosition:'center center'}"></div>
        </div>
        <div class="right">
        <p class="title">{{item.title}}</p>
        <p class="price">{{item.price}}</p>
        <p style="color: #999999">点击图片兑换</p>
        </div>
      </li>
      <!--        <li></li>-->
      <!--        <li></li>-->
      <!--        <li></li>-->
    </ul>
  </div>
</div>
</template>

<script>
    export default {
        name: "exchangeSuccess",
      data(){
          return{
            goodsList:[
              {img:"https://img.yzcdn.cn/vant/apple-1.jpg",
                title:"地铁出行券",
                price:"300积分"},
              {img:"https://img.yzcdn.cn/vant/apple-1.jpg",
                title:"地铁出行券",
                price:"300积分"},
              {img:"https://img.yzcdn.cn/vant/apple-1.jpg",
                title:"地铁出行券",
                price:"300积分"},
              {img:"https://img.yzcdn.cn/vant/apple-1.jpg",
                title:"地铁出行券",
                price:"300积分"},
              {img:"https://img.yzcdn.cn/vant/apple-1.jpg",
                title:"地铁出行券",
                price:"40积分"},
              {img:"https://img.yzcdn.cn/vant/apple-1.jpg",
                title:"地铁出行券",
                price:"40积分"},
              {img:"https://img.yzcdn.cn/vant/apple-1.jpg",
                title:"地铁出行券",
                price:"40积分"},
            ],
          }
      }
    }
</script>

<style scoped>
  #top{
    width: 100%;
    height:16rem;
    background: red;
    overflow: hidden;
    position: relative;
  }
  #topBar{
    height: 2rem;
    width: 100%;
    line-height: 2rem;
    background: papayawhip;
    color:black;
    font-size: 1rem;
    margin-top: 1rem;
  }
  #topBar p{
    display: inline-block;
  }
  #success{
    height: 4rem;
    width: 4rem;
    background: #39a9ed;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-size: 3rem;
    padding-top: 0.5rem;
    box-sizing: border-box;
    margin: 0 auto;
    margin-top: 2rem;
  }
  .botton{
    height: 1.8rem;
    width: 7rem;
    display: inline-block;
    background: #39a9ed;
    font-size: 0.8rem;
    color: white;
    border-radius: 0.3rem;
    line-height: 1.8rem;
    margin-top: 1.5rem;
  }
  #bottom{
   height: 100%;
    width: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
    border: #39a9ed dotted 0.1rem;
    box-sizing: border-box;
    margin-top: 1rem;
  }
  #goodsPic{
    width: 100%;
    height: 100%;
    padding-left: 2.8%;
    overflow: hidden;
    background: red;
  }
  #goodsPic>li{
    background: papayawhip;
    height: 7.6rem;
    width: 44%;
    float: left;
    margin-bottom: 2rem;
    margin-right: 1rem;
    position: relative;
    padding-top: 0.3rem;
  }
  .left{
    width: 50%;
    height: 100%;
    display: inline-block;
    float: left;

  }
  .right{
    width: 50%;
    height: 100%;
    display: inline-block;
    float: right;
    padding-top: 12%;
    box-sizing: border-box;
  }
  .goodsPic{
    height:80%;
    width: 100%;
    left: 5%;
    margin-top: 10%;
  }
  .title{
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  .price{
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #39a9ed;
  }
</style>
